#pragma once
#ifndef HC_MESSAGE
#define HC_MESSAGE

#include "stdafx.h"
#include "data.h"

#define MSG_NULL			0
#define MSG_GET_MSG			1
#define MSG_UPDATE			2
#define MSG_DRAW			3
#define MSG_TIMER			4
#define MSG_IS_QUEUE_EMPTY	5
#define MSG_QUEUE_EMPTY		6
#define MSG_QUEUE_NOT_EMPTY	7
#define MSG_EXIT			8
#define MSG_TIMER_WAIT		9
#define MSG_GET_COORDS		10
#define MSG_HERO_COORDS		11

#define MSG_INIT			12

#define MSG_DRAW_DATA		13
#define MSG_PRESSED_KEYS	14
#define MSG_GET_PRESSED_KEYS 15
#define MSG_SET_COORDS		16

#define	MSG_ROT_LEFT		17
#define MSG_ROT_RIGHT		18
#define MSG_ROT_CLKWISE		19
#define MSG_ROT_CCLKWISE	20

#define MSG_SET_CRSECTION	21
#define MSG_GET_SIZE		22
#define MSG_CUBE_SIZE		23

#define MSG_DRAW_L0			24
#define MSG_DRAW_L1			25
#define MSG_DRAW_L2			26
#define MSG_REFRESH_DISPL	27

class Message
{
public:
	Message() {};
	Message(const string& f, const string& t)
		: From(f), To(t), MsgCode(MSG_NULL) { };
	Message(const string& f, const string& t, int c)
		: From(f), To(t), MsgCode(c) { };
	Message(const string& f, const string& t, int c, const PData &d)
		: From(f), To(t), MsgCode(c), Data(d) { };
	~Message() {};

	void	Set(const string& f, const string& t, int c, const PData &d)
				{ From = f; To = t; MsgCode = c; Data = d; };
	void	Set(const string& f, const string& t, int c)
				{ From = f; To = t; MsgCode = c; };

public:
	string	From;
	string	To;
	int		MsgCode;
	PData	Data;
};

#endif